package com.linq.cool.oauth.config;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @Author: yqlin
 * @Date: 2021/1/21 07:38
 * @Description:
 * @Version: 1.0.0
 */
@Component
public class GiteeOauthProperties implements InitializingBean {

    public static String GITEE_CLIENT_ID;
    public static String GITEE_CLIENT_SERECT;
    public static String GITEE_REDIRECT_URL;

    @Value("${oauth2.gitee.client-id}")
    private String clientId;

    @Value("${oauth2.gitee.client-serect}")
    private String clientSerect;

    @Value("${oauth2.gitee.redirect-url}")
    private String redirectUrl;

    @Override
    public void afterPropertiesSet() throws Exception {
        GITEE_CLIENT_ID = clientId;
        GITEE_CLIENT_SERECT = clientSerect;
        GITEE_REDIRECT_URL = redirectUrl;
    }
}
